<template>
	<view class="page">
		<view class="blue-background"></view>
		<view class="nav"></view>

		<view class="section">
			<uni-card is-shadow>
				<view class="section-header">
					<text class="section-title">订单信息</text>
					<text class="status-done">已完成</text>
				</view>
				<view class="divider" />
				<view class="info-list">
					<view class="row"><text class="label">订单号：</text><text class="value">12121212487878</text></view>
					<view class="row"><text class="label">服务项目：</text><text class="value">车辆保养</text></view>
					<view class="row">
						<text class="label">服务门店：</text>
						<text class="value link">大宝车辆维修店</text>
						<uni-icons type="location-filled" color="#2f82ff" size="18" />
					</view>
					<view class="row"><text class="label">下单时间：</text><text class="value">2023-03-08   17:40</text></view>
					<view class="row"><text class="label">预约时间：</text><text class="value">2023-03-09   17:40</text></view>
					<view class="row"><text class="label">车牌：</text><text class="value">豫B FWE4A/豫A 98FHJ</text></view>
					<view class="row"><text class="label">备注：</text><text class="value"></text></view>
				</view>
			</uni-card>
		</view>

		<view class="section">
			<uni-card is-shadow>
				<view class="section-header">
					<text class="section-title">订单详情</text>
				</view>
				<view class="divider" />
				<view class="detail-list">
					<view class="item">
						<text class="item-name">车辆精洗</text>
						<text class="item-price">¥ 39.90</text>
					</view>
					<view class="item">
						<text class="item-name">车辆附加费用</text>
						<text class="item-price">¥ 0</text>
					</view>

					<view class="subtotal">
						<view class="line"><text class="left">原价</text><text class="right">¥ 59.90</text></view>
						<view class="line"><text class="left">店家优惠</text><text class="right minus">-¥ 20.00</text></view>
						<view class="line"><text class="left">优惠券</text><text class="right minus">-¥ 10.00</text></view>
					</view>
					<view class="pay">
						<text class="pay-label">支付金额</text>
						<text class="pay-amount">¥ 29.90</text>
					</view>
				</view>
			</uni-card>
		</view>

		<view class="section">
			<uni-card is-shadow>
				<view class="section-header">
					<text class="section-title">评价结果</text>
				</view>
				<view class="divider" />
				<view class="rate-block">
					<view class="row"><text class="label">评价时间：</text><text class="value">2023-04-10   11:09</text></view>
					<view class="row rate-row">
						<text class="label">评价结果：</text>
						<!-- <uni-rate :value="4" :max="5" disabled color="#e5e5e5" active-color="#ffff1d" size="18" /> -->
						<view class="rate-inline">
							<uni-rate :readonly="true" :value="4" size="15" />
						</view>
					</view>
					<view class="row">
						<text class="label">评语：</text>
						<text class="value comment">评价评价评价评价评价评价评价评价评价</text>
					</view>
				</view>
			</uni-card>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'AssessmentDid'
	}
</script>

<style>
	.page {
		background-color: #f5f6f7;
		min-height: 100vh;
		position: relative;
	}
	.nav {
		height: 150rpx;
		background-color: transparent;
	}
	/* 顶部蓝色背景层 */
	.blue-background {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 300rpx;
		background: linear-gradient(120deg, #3385fd 0%, #3385fd 100%);
	}
	.section {
		padding: 10rpx 1rpx 0;
		margin-top: -170rpx;
		margin-bottom: 150rpx;
	}
	.section:first-child {
		margin-top: -180rpx;
	}
	/* 头部左右对齐，右侧显示状态 */
	.section-header {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.section-title {
		font-size: 28rpx;
		color: #333333;
		font-weight: 600;
	}
	.status-done {
 		
		font-size: 24rpx;
		color: #ff6b6b;
 		
	}
	.divider {
		height: 2rpx;
		background-color: #f0f0f0;
		margin: 12rpx 0 6rpx;
	}
	.info-list .row,
	.rate-block .row {
		display: flex;
		flex-direction: row;
		align-items: center;
		margin-bottom: 14rpx;
		flex-wrap: nowrap;
	}
	/* 让评分组件与文字同一行且不拉伸 */
	.rate-block .row .rate-inline {
		display: inline-flex;
		flex: none;
		margin-left: 12rpx;
	}
	.label {
		font-size: 26rpx;
		color: #808080;
	}
	.value {
		font-size: 26rpx;
		color: #333333;
	}
	.link {
		color: #2f82ff;
	}
	.detail-list .item {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding: 10rpx 0;
	}
	.item-name {
		font-size: 26rpx;
		color: #666666;
	}
	.item-price {
		font-size: 26rpx;
		color: #333333;
	}
	.subtotal {
		margin-top: 10rpx;
		padding-top: 6rpx;
		border-top: 2rpx solid #f0f0f0;
		border-bottom: 2rpx solid #f0f0f0;
	}
	.subtotal .line {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		padding: 10rpx 0;
	}
	.left { color: #999999; font-size: 26rpx; }
	.right { color: #333333; font-size: 26rpx; }
	.minus { color: #ff6b6b; }
	.pay {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding-top: 12rpx;
	}
	.pay-label { color: #999999; font-size: 26rpx; }
	.pay-amount { color: #111111; font-size: 30rpx; font-weight: 700; }

	.rate-row { margin-top: 6rpx; }
	.comment { color: #666666; }

	/* 卡片圆角与阴影 */
	.section .uni-card,
	.section .uni-card__content,
	.section .uni-card__header {
		border-radius: 20rpx;
		overflow: hidden;
	}
</style>
